package com.cyt.website.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.website.model.po.WebsiteNews;
import com.cyt.website.model.vo.WebsiteNewsVo;
import com.cyt.sys.model.po.SysUser;
import com.cyt.sys.service.BaseService;

import java.util.List;

/**
 * 官网新闻资讯管理-官网新闻资讯管理Service层接口类
 *
 * @author congcong tao
 * @date 2019-8-13 10:00:52
 */
public interface WebsiteNewsService extends BaseService<WebsiteNews> {

    /**
     * 查询对象集合
     *
     * @param websiteNewsVo 对象
     * @return List 对象集合
     * @author congcong tao
     * @date 2019-8-13 10:00:52
     */
    List<WebsiteNews> listExample(WebsiteNewsVo websiteNewsVo);

    /**
     * 分页查询
     *
     * @param websiteNewsVo 接受参数对象
     * @param pageNum          分页数
     * @param pageSize         每页显示条数
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-13 10:00:52
     */
    ReturnResult page(WebsiteNewsVo websiteNewsVo, int pageNum, int pageSize);

    /**
     * 添加或更新
     *
     * @param websiteNewsVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-13 10:00:52
     */
    ReturnResult addOrUpdate(WebsiteNewsVo websiteNewsVo, SysUser sysUser);

    /**
     * 根据条件逻辑删除
     *
     * @param websiteNewsVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-13 10:00:52
     */
    ReturnResult remove(WebsiteNewsVo websiteNewsVo, SysUser sysUser);

    /**
     * 根据条件物理删除
     *
     * @param websiteNewsVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-13 10:00:52
     */
    ReturnResult delete(WebsiteNewsVo websiteNewsVo, SysUser sysUser);

    /**
     * 查询list并限制个数
     * @param websiteNewsVo
     * @param size
     * @author congcong tao
     * @date 2019/8/14 9:12
     */
    List<WebsiteNews> listBySize(WebsiteNewsVo websiteNewsVo, int size);
}